create external table jms_dim.dim_yl_tms_distribution_effective_base_dt
   (
    id bigint comment '主键' ,
        line_code string comment '线路编码',
        line_name string comment '线路名称',

        receive_network_code string comment '接收网点编码',
        receive_network_name string comment '接收网点名称',
        start_financial_center_code string comment '发出代理区编码',
        start_financial_center_desc string comment '发出代理区名称',
        start_regional_id bigint comment '发出大区id',
        start_regional_name string comment '发出大区名称',


        end_network_code string comment '目的网点编码',
        end_network_name string comment '目的网点名称',
        end_financial_center_code string comment '到达代理区编码',
        end_financial_center_desc string comment '到达代理区名称',
        end_regional_id bigint comment '到达大区id',
        end_regional_name string comment '到达大区名称',

        is_stop bigint comment '是否经停',


        latest_arrival_time string comment '最晚到车时间',
        planned_delivery_time string comment '规划发件时间',
        delivery_cross_day bigint comment '发件跨天',
        planned_departure_time string comment '规划发车时间',
        transport_day bigint comment '运输跨天',
        planned_arrival_time string comment '规划到达时间',
        latest_warehousing_time string comment '最晚到仓时间',
        out_line_day smallint comment '散货支线-班次衔接跨天',
        span_days_shift bigint comment '派件跨天',
        deadline_signing_time string comment '签收截止时间',
        total_consume_time string comment '总耗时',
        send_delivery_shifts bigint comment '对应派仓派件班次' ,
        warehouse_end_time string comment '派仓班次结束时间',
        out_shift bigint comment '散货班次' ,
        out_planned_departure_time string comment '散货时间',
        effective_date string comment '生效时间',
        expiration_date string comment '失效时间',
        is_enable int comment '启用状态:1启用；2禁用',
        sys_refresh int comment '系统刷新1 是 、0否',
        apply_day string comment '发出工作日',
        create_by bigint comment '创建人id'
        create_by_name string comment '创建人姓名',
        create_time TIMESTAMP comment '创建时间',
        update_by bigint comment '更新人id',
        update_by_name string comment '更新人姓名',
        update_time TIMESTAMP comment '更新时间',
        plan_warehouse_end_time string comment '规划派仓派件结束时间',
        plan_span_days_shift  bigint comment '规划派件跨天'
   ) comment '集散时效查询基础表'
PARTITIONED BY (
  `dt` string COMMENT '时间分区')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  '/dw/hive/jms_dim.db/external/dim_yl_tms_distribution_effective_base_dt';
